/**
 * @Author: yy
 * @Date: 2019/6/20
 * @Last Modified by: huanghuan
 * @Last Modified time: 2019-12-20 21:37:10
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
// 查询列表
export const queryBaseList = params => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/getAuditDistsList`, {params});
// 明细
export const getBaseInfoById = (id, potentialCustomersId, clueType) => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/auditDistPotentialDetail?actionId=${id}&potentialCustomersId=${potentialCustomersId}&clueType=${clueType}`,{ id: Number(id) });
// 联系人列表
export const getBaseContactList = id => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/getPlateDistList?potentialCustomerId=${id}`, { id: Number(id) });
// 新增联系人
export const addBaseContact = params => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/addPlateDistContactinfo`, params);
// 编辑联系人
export const editBaseContact = params => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/setPlateDistContactinfo`, params);
// 删除联系人
export const deleteBaseContact = id => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/deletePlateDistContactinfo/${id}`, { id: Number(id) });

// 基盘客户再分配
export const redistributionIds = id => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/setDistributionAuditDists/${id}`, { id: Number(id) });

//  查询线索信息
// export const queryPotenCusManage = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/clueMarkftinhView`, { params });

//基盘客户再分配
export const setDistributionAuditDists =params=> axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/setDistributionAuditDists`, params);

// 查询基盘变更历史
export const queryChangeList = id => axios.get(`${SERVER.CYXDMS_CLUE}/potenCus/queryPlateClueChangeList/?customerBusinessId=${id}`);
